<template>
	<div class="container">
		<van-nav-bar
		  left-arrow
		  @click-left="closeWin"
		  :border="false"
		>		
		  <van-icon name="arrow-left" slot="left" color="#000" size="20"/>
		  <div slot="title" class="weight_header" style="font-size: 16px;">提现进度</div>
	    </van-nav-bar>
	    
        <div class="wrap">
        	<div class="progress_left">        		        		
        		<div>
	        		<div class="finish"><img src="../../../../static/img/lanhu/78.png" alt="" /></div>
	        		<div class="line_wrap">
	        			<div class="finish_line"></div>
	        		</div>
        		</div>
        		
        		
        		<div>
	        		<div class="line_wrap">
	        			<span class="nofinish_line"></span>
	        		</div> 
	        		<div class="no_finish">
	        			<div class="span">
	        				
	        			</div>
	        			
	        		</div>
        		</div>
        	</div>
        	
        	
        	<div class="progress_right">
        		<div class="word1">提现申请已提交，等待处理</div>
        		<div class="word2">{{info.createTime}}</div>
        		<div class="word3">预计 1 个工作日可到账</div>
        	</div>
        </div> 
        
        
        <div class="message">
        	<div class="item">
        		<div class="word1">提现到</div>
        		<div class="word2">{{formatAccountType(info.cashWay)}} {{formatAccount(info.cashWay)}}</div>
        	</div>
        	<div class="item" style="margin-bottom: 0;">
        		<div class="word1">提现金额</div>
        		<div class="word2">¥ {{formatMoney(info.cashAmount)}}</div>        		
        	</div>
        </div>
       
	    
	    
	    <div class="next">
	    	<div @click="next">完成</div>
	    </div>
	    

	</div>	
</template>

<script>
import {getFun} from '@/api/publicFun.js'	
let publicFun=getFun()	
export default {	
	data() {
       return {
         cashId:'',
         userId:'',
         url1:this.$api+'/marketorderservice/api/v1/market/userCashOut/selectUserCashOutById/',
         info:{}
       }
	},
	methods: {	
       next(){
       	 this.closeWin()
       },
       getData(){
       	  let that=this
		  this.$Axios2.Get(this.url1+this.cashId).then(function(res) {
		  	 that.info=res.data
		  })         	
       },
       subAccount(str){
       	 if(str){       	 	 
	       	 if(str.length<=6){
	       	 	return str
	       	 }else{
		       	 let str1=str.substring(0,3)
		       	 let str2=str.substring(str.length-3)
		       	 let str3=str.substring(3,str.length-3)
		       	 let str4=''
		         for(var i=0;i<str3.length;i++){
		         	str4+='*'
		         }
		         return str1+str4+str2       	 	
	       	 }       	 	
       	 }
       },
       formatAccount(num){
       	    if(num){
		       	let str=''
				switch(num) {
			     case '0':
			        str=this.subAccount(this.info.payAccount) 
			        return str  
			        break;					 
			     case '1':
			        str=this.subAccount(this.info.payAccount)
			        return str  
			        break;
			     case '2':
			        str=this.subAccount(this.info.payAccount)
			        return str  
			        break;		        
				} 	
				       	    	
       	    }     	
       },
       formatMoney(num){
       	if(num){
       		return num.toFixed(2)
       	}else{
       		return '0.00'
       	}
       	
       },
       formatAccountType(num){       	
       	let str
		switch(num) {
	     case '0':
	        str='支付宝账号'
	        break;					 
	     case '1':
	        str='银联账号'
	        break;
	     case '2':
	         str='微信账号'
	        break;		        
		} 	
		return str
       }
	},
	mixins:[publicFun],//混入		
	mounted() {		
		this.cashId=this.$router.currentRoute.query.id
		this.userId=this.$router.currentRoute.query.userId
		this.getData()
		
	}
}	
</script>

<style scoped="" lang="scss">
*{font-size: 14px;color: #333;font-weight: 500;}
.container{position: absolute;left: 0;top: 0;background: #f8f8f8;min-height: 100%;width: 100%;}
.wrap{background: #fff;margin-top: 5px;padding: 25px 15px;display: flex;}
.title{font-size: 13px;color: #999;padding: 15px;margin-top: 10px;}
.next{padding: 15px;
  div{background: #FFD630;text-align: center;padding: 12px 0;font-size: 16px}
}


.progress_left{width: 15px;}
.finish img{width: 15px;height: 15px;display: block;}
.line_wrap{text-align: center;display: flex;justify-content: center;}
.finish_line{height: 30px;background: #FFEFAC;width: 2px;}
.nofinish_line{height: 30px;background: #E5E5E5;width: 2px;}
.no_finish .span{width: 15px;height: 15px;background: #E5E5E5;border-radius: 50%;}


.progress_right{flex: 1;margin-left: 15px;
     .word1{font-size: 13px;color: #333;font-weight: 500;margin-bottom: 12px;}
     .word2{font-size: 12px;color: #999;margin-bottom: 30px;}
     .word3{font-size: 13px;color: #999;}
}

.message{background: #fff;padding: 0 15px 25px;
     .item{display: flex;justify-content: space-between;margin-bottom: 13px;}
     .word1{font-size: 13px;color: #999;}
     .word1{font-size: 13px;color: #333;font-weight: 500;}
}
</style>